#ifndef SUPERELEMENT_H
#define SUPERELEMENT_H

#include <QObject>
#include <QGraphicsItem>

class SuperElement : public QGraphicsItem
{
public:
    enum ObjectType {
        None,//空的
        Player,//人物
        Prop,//道具
        BoomBox,//爆炸箱子
        UnBoomBox,//不可爆炸箱子
        Bubble//泡泡
    };

    SuperElement() {
        this->m_visible = true;
    }
    SuperElement(int x, int y, int w, int h){
        m_x = x;
        m_y = y;
        m_w = w;
        m_h = h;
        m_visible = true;
        m_objectType = None;
    }

    void update() {
        move();
        destroy();
    }

    virtual void showElement() = 0;
    virtual void move() = 0;
    virtual void destroy() = 0;
    virtual void allowPass() = 0;

    int getX() const;
    void setX(int value);

    int getY() const;
    void setY(int value);

    int getW() const;
    void setW(int value);

    int getH() const;
    void setH(int value);

    bool getVisible() const;
    void setVisible(bool value);

    ObjectType getObjectType() const;
    void setObjectType(const ObjectType &value);

private:
    int m_x;
    int m_y;
    int m_w;
    int m_h;
    bool m_visible;
    ObjectType m_objectType;

};

#endif // SUPERELEMENT_H
